<!-- form表单视图 -->
<div style="margin-top:30px">
    <form class="form-horizontal common-form" id="form-save" method="post" action="/member/index/save" onsubmit="return false;" autocomplete="off">
    <input type=hidden value="{{$row['id'] ?? ''}}" name="id" id="id">
        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-username" class="control-label col-xs-12 col-sm-2">
                <span style="color:red">*</span> 会员账号：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="username" class="form-control col-sm-6" name="username" type="text" value="{{$row['username'] ?? ''}}" placeholder="" data-rule="会员名称:required">
                    <span class="col-sm-6 color-6A6969"> 英文与数字组成。</span>
                </div>
                <span class="msg-box" style="position:static;" for="username"></span>
            </div>
        </div>
         <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-lv_id" class="control-label col-xs-12 col-sm-2">
                <span style="color:red">*</span> 等级：
            </label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <select class="form-control col-sm-6" id="lv_id" name="lv_id" data-rule="等级:required">
                        @foreach($lv_id_list as $k=>$v)
                            <option value={{$k}} @if(isset($row['lv_id']) && $k == $row['lv_id']) selected @endif >{!! $v !!}</option>
                        @endforeach
                    </select>
                    <span class="col-sm-6 color-6A6969"> 选择会员所属等级。</span>
                </div>
                <span class="msg-box" style="position:static;" for="lv_id"></span>
            </div>
        </div>
        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-password" class="control-label col-xs-12 col-sm-2">
                <span style="color:red">*</span> 密码：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="password" class="form-control col-sm-6" name="password" type="password" value="" placeholder="" data-rule="@if (!isset($row['id']))密码:required;password @endif 密码:password" >
                    <span class="col-sm-6 color-6A6969"> 英文与数字组成。</span>
                </div>
                <span class="msg-box" style="position:static;" for="password"></span>
            </div>
        </div>

        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-nickname" class="control-label col-xs-12 col-sm-2">
             昵称：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="nickname" class="form-control col-sm-6" name="nickname" type="text" value="{{$row['nickname'] ?? ''}}" placeholder="" data-rule="昵称:required">
                    <span class="col-sm-6 color-6A6969"> 支持中英文,区分大小写,长度2~15位。</span>
                </div>
                <span class="msg-box" style="position:static;" for="nickname"></span>
            </div>
        </div>

        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mobile" class="control-label col-xs-12 col-sm-2">
            <span style="color:red">*</span> 手机号：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="mobile" class="form-control col-sm-6" name="mobile" type="text" value="{{$row['mobile'] ?? ''}}" placeholder="" data-rule="手机号:required">
                    <span class="col-sm-6 color-6A6969"> 联系方式，按正确手机号规则填写。</span>
                </div>
                <span class="msg-box" style="position:static;" for="mobile"></span>
            </div>
        </div>

        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-email" class="control-label col-xs-12 col-sm-2">
             邮箱：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="email" class="form-control col-sm-6" name="email" type="text" value="{{$row['email'] ?? ''}}" placeholder="" data-rule="邮箱:required">
                    <span class="col-sm-6 color-6A6969"> 请输入正确的邮箱地址，可能用于密码找回。</span>
                </div>
                <span class="msg-box" style="position:static;" for="email"></span>
            </div>
        </div>

        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-birthday" class="control-label col-xs-12 col-sm-2">
            <span style="color:red">*</span> 生日：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <div class="col-sm-6" style="padding-left: 0;padding-right: 0">
                        <input name="birthday" @if($row['birthday']??'')value="{{date("Y-m-d H:i:s",$row['birthday'])}}" @endif type="text" style="font-size: 12px;width: 100%" id="reservationtime" class="form-control float-right date-picker datetimerange">
                        <i class="fa fa-calendar"></i>
                    </div>
                    <span class="col-sm-6 color-6A6969"> 选择出生日期。</span>
                </div>
                <span class="msg-box" style="position:static;" for="birthday"></span>
            </div>
        </div>
        <div class="form-group row form-item" style="height: 12%;">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">头像：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <div style="padding-left: 0;" class="col-sm-5">
                        @component('component/image_upload',['upload_url' => config('common.upload_url'),'name'=>'avatar','uploader'=>'uploader','direction'=>1,'browse_btn'=>'form-avatar','content_class'=>'background','img_format'=>'gif,jpg,jpeg,png','img_size'=>'1000kb','num'=>1,'value'=>$row['avatar']??''])
                        @endcomponent
                    </div>
                    <span class="col-sm-7 color-6A6969"> 推荐：80 * 80 PX,大小：100K。格式：gif / jpg / jpeg / png。</span>
                </div>
            </div>
        </div>

    </form>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-3F51B5 btn-sure btn-submit">确定</button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="reset" class="btn btn-write btn-reset">重置</button>
        </div>
    </div>
</div>

